import React from 'react';

// class TodoList extends React.Component {

// }

// export default TodoList;

// 自己写的双向绑定
export default class extends React.Component {

  state = {
    inputValue: '',
  };

  onInpChange (e) {
    this.setState({
      inputValue: e.target.value,
    });
  }

  render () {
    return (
      <>
        { this.state.inputValue }
        <input
          type="text"
          value={ this.state.inputValue }
          onChange={ this.onInpChange.bind(this) }
        />
      </>
    );
  }

}
